<div class="tpl-content-wrapper">
<!-- <div class="tpl-content-page-title">
Amaze UI 文字列表
</div>
<ol class="am-breadcrumb">
<li><a href="#" class="am-icon-home">首页</a></li>
<li><a href="#">Amaze UI CSS</a></li>
<li class="am-active">文字列表</li>
</ol> -->
<div class="tpl-portlet-components">
<div class="portlet-title">
    <div class="caption font-green bold">
        <span class="am-icon-code"></span> 列表
    </div>
    <div class="tpl-portlet-input tpl-fz-ml">
        <div class="portlet-input input-small input-inline">
            <!-- <div class="input-icon right">
                <i class="am-icon-search"></i>
                <input type="text" class="form-control form-control-solid" placeholder="搜索..."> </div> -->
        </div>
    </div>


</div>
<div class="tpl-block">
    <div class="am-g">
    <form action="{:U('privilege_del')}" action="get">
        <div class="am-u-sm-12 am-u-md-6">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <a href="{:U('privilege_add')}" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</a>
                    <!-- <button type="button" class="am-btn am-btn-default am-btn-secondary"><span class="am-icon-save"></span> 保存</button> -->
                    <!-- <button type="button" class="am-btn am-btn-default am-btn-warning"><span class="am-icon-archive"></span> 审核</button> -->
                    
                </div>
            </div>
        </div>
        <!-- <div class="am-u-sm-12 am-u-md-3">
            <div class="am-form-group">
                <select data-am-selected="{btnSize: 'sm'}">
                  <option value="option1">所有类别</option>
                  <option value="option2">IT业界</option>
                  <option value="option3">数码产品</option>
                  <option value="option3">笔记本电脑</option>
                  <option value="option3">平板电脑</option>
                  <option value="option3">只能手机</option>
                  <option value="option3">超极本</option>
                </select>
            </div>
        </div>
        <div class="am-u-sm-12 am-u-md-3">
            <div class="am-input-group am-input-group-sm">
                <input type="text" class="am-form-field">
                <span class="am-input-group-btn">
                <button class="am-btn  am-btn-default am-btn-success tpl-am-btn-success am-icon-search" type="button"></button>
              </span>
            </div>
        </div> -->
    </div>
    <div class="am-g">
        <div class="am-u-sm-12">
            <form class="am-form">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                        <tr>
                            <th class="table-check"><input id="all_check" type="checkbox" class="tpl-table-fz-check"></th>
                            <th class="table-id">ID</th>
                            <th class="table-title">权限组名</th>
                            <th class="table-type">权限信息</th>
                            <th class="table-author am-hide-sm-only">添加时间</th>
                            <th class="table-date am-hide-sm-only">修改时间</th>
                            <th class="table-set">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    <volist name="data" id="v">
                        <tr>
                            <td><input type="checkbox" name="id[]" value="{$v.id}"></td>
                            <td>{$v.id}</td>
                            <td><a href="#">{$v.name}</a></td>
                            <td>{$v.privilege|subtext=40}</td>
                            <td class="am-hide-sm-only">{$v.c_time|date='Y-m-d H:i:s',###}</td>
                            <td class="am-hide-sm-only">{$v['u_time']|date='Y-m-d H:i:s',###}</td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a href="{:U('privilege_edit',array('id'=>$v['id']))}" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</a>
                                        <a href="javascript:if(confirm('确实要删除该内容吗?'))location='{:U('privilege_del?id='.$v['id'])}'"  class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"><span class="am-icon-trash-o"></span> 删除</a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </volist> 

                    </tbody>
                </table>
                <div class="am-cf">
                    <div class="am-fr">
                        <ul class="am-pagination tpl-pagination">
                            <li>
                                {$page}
                            </li>
                        </ul>
                    </div>
                    <!-- <div class="am-fr">
                        <ul class="am-pagination tpl-pagination">
                            <li class="am-disabled"><a href="#">«</a></li>
                            <li class="am-active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">4</a></li>
                            <li><a href="#">5</a></li>
                            <li><a href="#">»</a></li>
                        </ul>
                    </div> -->
                </div>
                <hr>

            </form>
        </div>

    </div>
    </form>
</div>
<div class="tpl-alert"></div>
</div>
</div>

<script type="text/javascript">
$(function() {
$('#all_check').click(function() {
    var check = $(this).is(':checked');
    $('input[name="id[]"]').prop('checked',check)
    // $('input[name=id[]]').attr('checked',check)
});
});
</script>